﻿@{
    ViewBag.Title = "领料单列表";
    Layout = "~/Views/Shared/_LayoutList.cshtml"; 
}
@(       
 Html.DWZGridFor<Resto.CostControl.Core.MaterialProcess>()
    .Title("领料单列表")
    .Action(@Url.Action("Index"))
    .Columns(col =>
    {
        col.Bind(e => e.Id).IsKey();
        //col.Bind(e => e.Code).Width(80).AsQuery().Align(FlexiGridAlign.Left);
        col.Bind(e => e.ProcessDate).Width(70).DateFormat("yyyy-MM-dd");
        col.Bind(e => e.Category).EnumKey("MaterialCategory").Width(50);
        col.Bind(e => e.OrderState).Width(40).EnumKey("ProcessState");
        col.Bind(e => e.ItemDesc).Width("auto").Align(FlexiGridAlign.Left);
        col.Bind(e => e.UpdateUser).Width(60);
        col.Bind(e => e.UpdateDate).Width(70).DateFormat("yyyy-MM-dd");
        col.Bind(e => e.Id, "操作", 60).Sortable(false)
            .Template(Url.GridLink("accept", "领料", "Picking('${Id}')"));
    })
)
<script type="text/javascript">
    function Picking(id) {
        OpenFormDialog('@Url.Action("Edit")/' + id, "领加工原材料");
    }
</script>
